import { ShopEntity } from "@/interfaces/ShopEntity"


export const getShopForm = (item?: ShopEntity) => {

    return [{
        type: "avatar",
        name: "avatar",
        label: "封面"
    }, {
        type: "input",
        name: "name",
        label: "店铺名称*",
        defaultValue: item?.name,
        required: true
    }, {
        type: "input",
        name: "phone",
        label: "联系方式*",
        defaultValue: item?.phone,
        required: true
    }, {
        type: "option",
        name: "address",
        label: "店铺地址*",
        options: [{
            name: "第一食堂",
            value: "第一食堂"
        }, {
            name: "第二食堂",
            value: "第二食堂"
        }, {
            name: "第三食堂",
            value: "第三食堂"
        }, {
            name: "街边小吃",
            value: "街边小吃"
        }],
        defaultValue: item?.address,
        required: true
    }, {
        type: "input",
        name: "information",
        label: "店铺介绍",
        defaultValue: item?.name
    }, {
        type: "number",
        name: "threshold",
        label: "起送费",
        defaultValue: (item?.threshold || 0) / 100,
        step: 0.01
    }, {
        type: "number",
        name: "total",
        label: "配送费",
        defaultValue: (item?.total || 0) / 100,
        step: 0.01
    }, {
        type: "input",
        name: "businessHours",
        label: "营业时间*",
        defaultValue: item?.businessHours
    }]
}